package com.simple.api.serivce.impl;

import com.simple.api.dao.logs.LoginLogMapper;
import com.simple.api.entity.LoginLog;
import com.simple.api.entity.Person;
import com.simple.api.dao.test.PersonMapper;
import com.simple.api.serivce.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class TestServiceImpl implements TestService {

    @Autowired
    public PersonMapper personMapper;
    @Autowired
    public LoginLogMapper loginLogMapper;

    @Override
    public List<Person> queryAll() throws Exception {
        return personMapper.findAll();
    }

    @Override
    public List<LoginLog> queryLogAll() throws Exception {
        return loginLogMapper.findAll();
    }

    @Override
    public void addPerson(Person person) throws Exception {
        personMapper.addPerson(person);
    }
}
